home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / bsort201.zip / DEMO-ERR.BAT < prev    next >
DOS Batch File  |  1994-11-19  |  896b  |  39 lines

  1. @ECHO off
  2.  
  3. REM Demo of how to use ErrorLevels in batch files.  
  4. REM For use with BigSortPlus(tm).
  5. REM Written 08/15/93    MeadowBrook Industries, Ltd.    ALL RIGHTS RESERVED
  6.  
  7. BigSort %1 %2 %3 %4
  8. IF ErrorLevel 50 GOTO Key
  9. IF ErrorLevel 40 GOTO Format
  10. IF ErrorLevel 30 GOTO Output_File
  11. IF ErrorLevel 20 GOTO Input_File
  12. IF ErrorLevel 10 GOTO System
  13. IF ErrorLevel  1 GOTO Params
  14. IF ErrorLevel  0 GOTO Success
  15.  
  16. :Key
  17. ECHO Error with the specified key! re-enter.
  18. GOTO Exit
  19. :Format
  20. ECHO Error with the specified format! re-enter.
  21. GOTO Exit
  22. :Output_File
  23. ECHO Error with the output file! re-enter.
  24. GOTO Exit
  25. :Input_File
  26. ECHO Error with the input file(s)! re-enter.
  27. GOTO Exit
  28. :Memory
  29. ECHO Error with the system configuration!
  30. GOTO Exit
  31. :Params
  32. ECHO Input and Output files are required! re-enter.
  33. GOTO Exit
  34. :Success
  35. ECHO Successful run.  Terminating processing.
  36.  
  37. :Exit
  38.  
  39.